﻿function pageLoad(sender, args)
{
  $addHandler($get("btnSave"),"click",SaveSet);
}
//保存普通的设置
function SaveSet()
{
    $get("btnSave").disabled = true;
    showProgressBar(true);
    var SiteLanguages =$get("SiteLanguages").value;
    var TimeZone=$get("TimeZone").value;
    WebServices.My.UpdateGeneSet( MemberNo,SiteLanguages,TimeZone,onsucc);
}

function onsucc(result)
 {
   if(result)
   {
   var la=$get("SiteLanguages").value;
document.cookie ="Language="+la+";path=/;domain=italki.com";
    $get("MessagesBox").style.display='';
      $get("MessageImg").src = MessageImageS;
        $get("MessageText").innerHTML = MessageTextS;
   }
   else
   {
   $get("MessagesBox").style.display='';
     $get("MessageImg").src = MessageImageF;
        $get("MessageText").innerHTML = MessageTextF;
    }
    
   $get("btnSave").disabled = false;
    showProgressBar(false);
 }

